<?php

class Action extends SQLQuery{
	protected $_action;

	function __construct() {
		//$databaseConfiguration = DB_CONFIG;
		global $databaseConfiguration;
		if(!$databaseConfiguration){
			throw new Exception("Could not retrieve the database configuration");
		}
		$db = $databaseConfiguration[IHELP_DATABASE_NAME];
		if(!$db){
			throw new Exception("Could not retrieve the desired database");
		}
		$host = $db[DB_HOST_PARAM];
		$user = $db[DB_USER_PARAM];
		$passwd = $db[DB_PASSWORD_PARAM];
		$database = $db[DB_NAME_PARAM];
		$this->connect($host,$user,$passwd,$database);
		$this->_action = get_class($this);
		$this->_table = strtolower($this->_action)."s";
	}

	function __destruct() {
	}
}